今天這篇主要介紹的是安裝指令與流程,如果已經熟悉的朋友們就跳過吧。
在Ubuntu 16.04上安裝Elasticsearch前,必須安裝Oracle JAVA 8,再來才是安裝Elasticsearch,總之就先按照下面列出的指令來安裝吧!!
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update && sudo apt-get -y install oracle-java-installer
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get -y install elasticsearch
sudo update-rc.d elasticsearch defaults 95 10
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service